package com.hxzy.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订阅了nacos中的config的配置信息
 */
@RefreshScope
@RestController
public class ApplicationController {


    @Value(value = "${sms.id}")
    private Integer smsId;

    @GetMapping(value = "/name")
    public String showName(){
        return "ok-"+smsId;
    }
}
